import config from "@/config"
import http from "@/utils/request"

// 分页获取待初检人员信息
export const getexamineInfo = {
    url: `${config.BASE_URL}/conscript/examine/listmsg`,
    name: "分页获取待初检人员",
    get: async function (param) {
        return await http.get(this.url + `/${param.pageNum}/${param.pageSize}`)
    }
}

// 导出所有待初检信息
export async function exportExamineInfo() {
    let res = await fetch(`${config.BASE_URL}/conscript/examine/export`, {
        method: 'get',
        headers: {
            'Content-Type': 'application/json',
        }
    }).then(res => res.blob()).then(data => {
        var blobUrl = window.URL.createObjectURL(data);
        return blobUrl
    })
    return res
}